Building My Smart 2nd Brain, Part 2: Human-in-the-Loop Querying with Robust Checkpointing
From part 1, I kicked off the Smart 2nd Brain with two execution paths. Previously, we walked through the ingestion flow—splitting documents, generating embeddings, and storing them in a vector database. In this installment, we’ll switch gears to the query path and see how those embeddings power retrieval and human-in-the-loop answers.
Now let's go through the query path:
# =============================================================================
# QUERY BRANCH
# =============================================================================
# Knowledge query pipeline
graph.add_edge("retriever", "answer") # Retrieve -> Generate
graph.add_edge("answer", "review") # Generate -> Review
graph.add_edge("review", "v…
( 14
min )